package com.smallrig.mall.template.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smallrig.mall.template.entity.Order;
import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

public interface OrderService extends IService<Order> {

    void saveOrder();

    boolean saveOrder(List<Order> orders);

    Order testAsync();

    Future<Order> testAsyncFuture();

    Future<Order> testNestedAsync() throws ExecutionException, InterruptedException;

    Order pay(int id);

    Order deliver(int id);

    Order receive(int id);
}
